import request from '@/utils/request'

// 月卡列表
export function getCardListAPI(params) {
  return request({
    url: '/parking/card/list',
    params
  })
}

// 新增月卡
export function createCardAPI(data) {
  return request({
    url: '/parking/card',
    method: 'post',
    data
  })
}

// 获取月卡详情
export function getCardDetailAPI(id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}

// 修改月卡详情
export function updateCardAPI(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data
  })
}

// 删除月卡
export function deleteCardAPI(ids) {
  return request({
    url: `/parking/card/${ids}`,
    method: 'delete'
  })
}

// 批量删除
export function delCardListAPI(idList) {
  return request({
    url: `/parking/card/${idList.join(',')}`,
    method: 'delete'
  })
}
